﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Patrika.Service.Roles
{
    class SessionStateWorker : WorkerEntryPoint
    {
        protected override int ProcessItems()
        {
            var processedItems = 0;
            //try
            //{
            //    foreach (var session in TableStorageDataSource.GetExpiredSessions(applicationName, DateTime.Now))
            //    {
            //        TableStorageDataSource.Delete(session);
            //        processedItems++;
            //    }
            //}
            //catch (DataServiceQueryException)
            //{
            //    // Intentionally blank; is thrown if the SessionState table is not created yet
            //}
            return processedItems;
        }
    }
}
